home *** CD-ROM | disk | FTP | other *** search
- Path: god.bel.alcatel.be!nlev00!barnhoorn
- From: barnhoorn@nlev00 ()
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Need little C Help! (How to make caracters apear on the same spot again and again?)
- Date: 26 Feb 1996 08:49:13 GMT
- Organization: Alcatel Bell
- Distribution: world
- Message-ID: <4grs69$puv@btmpjg.god.bel.alcatel.be>
- References: <4gjudo$i95@news.xs4all.nl>
- Reply-To: barnhoorn@nlev00 ()
- NNTP-Posting-Host: 138.203.178.61
- X-Newsreader: mxrn 6.18-10
-
-
- In article <4gjudo$i95@news.xs4all.nl>, vasquez@xs4all.nl (Joel Wijngaarde) writes:
- |> Hello,
- |>
- |> Can somebody tel me how i can make a counter in C wich counts at the same
- |> screen position. I'm mean something like the in the program 'Lha'. This
- |> program counts the bytes, that are (un)packed. The number of bytes
- |> increases on the same spot; NOT like this:
- |> 1 2 3 4 5 6 7 8 9 10 11 12 etc....
- |>
-
- How about this:
-
- main()
- {
- int c;
- for (c=1;c>13;c++) {
- printf(" NOT like this: %d etc...\r",c);
- /* the string starts with a space, this is where
- the cursor will be after the '\r' */
- fflush(stdout);
- /* this is important, because without it, the
- printed string is not displayed until a
- '\n' is printed */
- }
- printf("\n");
- }
-
- ---------------------------------------------------------------------------
- Jaco Barnhoorn barnie@xs4all.nl
- Software Test Engineer barnhoorn%nlev00@btmv56.se.bel.alcatel.be
- Alcatel Telecom Systems
- Rijswijk, The Netherlands
- ---------------------------------------------------------------------------
-